import request from '/@/utils/request';

/**
 API
 */
export function useUserApi() {
    return {
        add: (params?: object) => {
            return request({
                url: '/system-admin/sys-user/add',
                method: 'post',
                data: params,
            });
        },
        getPage: (params?: object) => {
            return request({
                url: '/system-admin/sys-user/page',
                method: 'post',
                data: params,
            });
        },
        edit: (params?: object) => {
            return request({
                url: '/system-admin/sys-user/edit',
                method: 'post',
                data: params,
            });
        },
        del: (params?: object) => {
            return request({
                url: '/system-admin/sys-user/del',
                method: 'post',
                data: params,
            });
        },
        editAvatarPath: (params?: object) => {
            return request({
                url: '/system-admin/sys-user/editAvatarPath',
                method: 'post',
                data: params,
                headers:{'Content-Type': 'multipart/form-data'},
            });
        },
    };
}
